@extends('layouts.adminLayouts')

@section('mainContent')

    <div class="btn-group">
        <a class="btn btn-info" href="{{route('admin.roles.create')}}">新增用户</a>
        <a class="btn btn-danger" href="{{route('admin.roles.create')}}">删除用户</a>
    </div>

    <div class="box" style="margin-top: 15px;">
        <div class="box-header">
            <h3 class="box-title">用户列表</h3>
        </div>

        <div class="box-body">
            <table class="table">
                <thead>
                <tr>
                    <th>
                        <label class="checkbox-inline">
                            <input class="all" type="checkbox">
                        </label>
                        全选
                    </th>
                    <th>编号</th>
                    <th>角色名称</th>
                    <th>规则</th>
                    <th>创建时间</th>
                    <th>更新时间</th>
                </tr>
                </thead>

                <tbody>
                @foreach($userList as $row)
                    <tr>
                        <td>
                            <label class="checkbox-inline">
                                <input class="check" type="checkbox" value="{{$row->id}}">
                            </label>
                        </td>
                        <td>{{$row->id}}</td>
                        <td>{{$row->name}}</td>
                        <td>{{$row->email}}</td>
                        <td>{{$row->created_at}}</td>
                        <td>{{$row->updated_at}}</td>
                        <td>
                            <a class="text-blue" href="{{route('admin.user.edit',$row->id)}}">
                                <i class="fa fa-pencil"></i>
                            </a>
                            <a class="text-danger">
                                <i class="fa fa-close"></i>
                            </a>
                            <a href="{{route('admin.user.roles',$row->id)}}" class="text-warning">
                                <i class="fa fa-navicon"></i>
                            </a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

    </div>

@endsection





